package com.zzj.filedownloader.download;

import android.widget.Button;
import cn.qqtheme.framework.adapter.FileAdapter;

/* loaded from: classes.dex */
public class TaskInfo {
    Button button;
    private String fileName;
    private boolean isOnDownloading;
    private String taskID;
    private long fileSize = 0;
    private long downFileSize = 0;

    public boolean isOnDownloading() {
        return this.isOnDownloading;
    }

    public void setOnDownloading(boolean z) {
        this.isOnDownloading = z;
    }

    public int getProgress() {
        long j = this.fileSize;
        if (j == 0) {
            return 0;
        }
        return (int) ((this.downFileSize * 100) / j);
    }

    public String getTaskID() {
        return this.taskID;
    }

    public void setTaskID(String str) {
        this.taskID = str;
    }

    public String getFileName() {
        return this.fileName;
    }

    public void setFileName(String str) {
        this.fileName = str;
    }

    public String getType() {
        String str = this.fileName;
        if (str != null) {
            String lowerCase = str.toLowerCase();
            if (lowerCase.contains(FileAdapter.DIR_ROOT)) {
                return lowerCase.substring(lowerCase.lastIndexOf(FileAdapter.DIR_ROOT), lowerCase.length());
            }
        }
        return null;
    }

    public long getFileSize() {
        return this.fileSize;
    }

    public void setFileSize(long j) {
        this.fileSize = j;
    }

    public long getDownFileSize() {
        return this.downFileSize;
    }

    public void setDownFileSize(long j) {
        this.downFileSize = j;
    }
}
